public class Circle {

    public double getR() {
        return r;
    }

    public void setR(double r) {
        this.r = r;
    }

    private double r;

    public double CalSquare() {
        return Math.PI * r * r;
    }

    public double CalLength() {
        return 2 * Math.PI * r;
    }

    public static void main(String[] args) {
        Circle circle1 = new Circle();
        circle1.setR(3);
        System.out.println(circle1.CalSquare());
        System.out.println(circle1.CalLength());
    }
}
